5
5
.
.
8
8
.
.
f
f
o
o
n
n
t
t
I
I
n
n
f
f
o
o
[
[
R
R
]
]
.font modifier defines Font Family & size.
Syntax
.font(.largeTitle)
.font(.system(size: 200))
.font(Font.system(size: 72))
.font(Font.custom("Arial Rounded MT Bold", size: 18))
.font(Font.custom("Arial Rounded MT Bold", size: 18).weight(.black))
E
E
x
x
a
a
m
m
p
p
l
l
e
e
Example
struct ContentView: View {
var body: some View {
VStack {
Text("caption" ).font(.caption)
Text("footnote" ).font(.footnote)
Text("body" ).font(.body)
Text("title" ).font(.title)
Text("largeTitle" ).font(.largeTitle)
Text("subheadline").font(.subheadline)
Text("headline" ).font(.headline)
}
}
}
Output